package eddy.yang.wordpad;

import java.awt.Color;
import java.awt.Component;
import java.awt.Graphics;

import javax.swing.Icon;

public class ColoredBox implements Icon {
	Color color;
	public ColoredBox(Color c) {
		color = c;
	}
	
	public int getIconHeight() {
		return 10;
	}

	public int getIconWidth() {
		return 10;
	}

	public void paintIcon(Component c, Graphics g, int x, int y) {
		g.setColor(color);
//		g.fillOval(x, y, getIconWidth(), getIconHeight());
		g.fillRect (x, y, getIconWidth(), getIconHeight());
	}

}
